<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件修饰符之once</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="root">
        <a href="https://www.baidu.com" @click.prevent="showInfo">{{content}}</a>
    </div>
</body>
<script>
    Vue.config.productionTip = false
    const vm = new Vue({
        el: "#root",
        data: {
            content: "你好Vue！！我一定要学会你"
        },
        methods: {
            showInfo(){
                alert("跳转")
            }
        }
    })
</script>
</html>